package com.zw.yzk.kabu.internal.module;

import android.content.Context;

import com.zw.yzk.kabu.base.BaseApplication;
import com.zw.yzk.kabu.data.UIThread;
import com.zw.yzk.kabu.data.executor.JobExecutor;
import com.zw.yzk.kabu.domain.executor.ExecutionThread;
import com.zw.yzk.kabu.domain.executor.ThreadExecutor;

import dagger.Module;
import dagger.Provides;

/**
 * Created by zhanwei on 2016/12/23.
 */

@Module
public class ApplicationModule {
    public final BaseApplication application;

    public ApplicationModule(BaseApplication application) {
        this.application = application;
    }

    @Provides
    Context provideContext() {
        return this.application;
    }

    @Provides
    ThreadExecutor provideThreadExecutor(JobExecutor jobExecutor) {
        return jobExecutor;
    }

    @Provides
    ExecutionThread provideExecutionThread(UIThread uiThread) {
        return uiThread;
    }
}
